<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="https://www.thymeleaf.org/">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="./img/asset-favicon.ico">
    <title>Arctery库存查询</title>

    <!--    <link rel="stylesheet" href="../static/css/normalize.css"/>-->
    <!--    <link rel="stylesheet" href="../static/css/bootstrap.css"/>-->
    <!--    <link rel="stylesheet" href="../static/css/good-arctery.css"/>-->

    <link rel="stylesheet" th:href="@{/css/normalize.css}" href="../static/css/normalize.css"/>
    <link rel="stylesheet" th:href="@{/css/bootstrap.css}" href="../static/css/bootstrap.css"/>
    <link rel="stylesheet" th:href="@{/css/good-arctery.css}" href="../static/css/good-arctery.css"/>
</head>

<body data-spy="scroll" data-target="#articleNavbar" data-offset="150">
<!-- 页面头部 -->


<div class="container">
    <div class="good-arctery">
        <div class="cartCont">
            <div class="top">
                <div class="csAbout" th:text="${arcterySpuVo != null ? arcterySpuVo.spuName :'无数据'}"></div>
            </div>
            <div class="cont">
                <div th:if="${message != null}">
                    <p th:text=${message}></p>
                </div>

                <div th:if="${arcterySpuVo != null}">
                <div class="item" th:each="arcterySkuVo : ${arcterySpuVo.getArcterySkuVos()}">
                    <div class="csAbout">
                        <img th:src=${arcterySkuVo.skuImage} src="../img/asset-video.png " width="72" height="100"
                             alt="">
                        <div class="contInfo">
                            <p class="tit">商品名称: <span th:text=${arcterySkuVo.skuName}></span></p>
                            <p class="inventory">库存: <span th:text=${arcterySkuVo.inventory}>尺码</span></p>
                        </div>
                        <div class="midInfo">
                            <p class="sizeLabel">商品尺码: <span th:text=${arcterySkuVo.sizeLabel}>尺码</span></p>
                            <p class="colourLabel">颜色: <span th:text=${arcterySkuVo.colourLabel}>尺码</span></p>
                        </div>
                    </div>
                    <div class="sumMon">
                        <p><strong>原价: $</strong>  <span th:text=${arcterySkuVo.price}>1000</span></p>
                        <p><strong>现价: $</strong>  <span th:text=${arcterySkuVo.discountPrice}>1000</span></p>
                    </div>
                </div>
                </div>
            </div>

        </div>
    </div>
</div>
<!-- 页面底部 -->

<!-- 页面 css js -->
<script type="text/javascript" src="../static/js/jquery.js"></script>
<script type="text/javascript" src="../static/js/bootstrap.js"></script>
<script>
    var num = 0

    // 全选价格计算
    function selectAll() {
        var isCheck = $("#sel_1").is(':checked');
        num = 0
        $('.cont').find("input[type='checkbox']").each(function () {
            this.checked = isCheck;
            if (isCheck) {
                var st = $(this).parent().parent().find('.sumMon span').text()
                num += Number(st)
            }
        });
        $('.bot .sumMon span i').text(num)
    }

    // 单选价格计算
    function sumMon(obj) {
        if (obj.is(':checked')) {
            var st = obj.parent().parent().find('.sumMon span').text()
            num += Number(st)
        } else {
            var st = obj.parent().parent().find('.sumMon span').text()
            num -= Number(st)
        }
        $('.bot .sumMon span i').text(num)
    }

    // 提交订单
    $('.subBut').click(function () {

    })
</script>
</body>

</html>